import request from '@/utils/request'

// 注册请求
export const regAPI = obj => request.post('/api/reg', obj)

// 登录请求
export const loginAPI = obj => request.post('/api/login', obj)

// 获取用户信息
export const getUser = () => request.get('/my/userinfo')

// 修改用户信息
export const userInfoAPI = data => request.put('/my/userinfo', data)

// 修改密码
export const updatePwdAPI = data => request.patch('/my/updatepwd', data)

// 上传头像
export const updateAvatarAPI = str => request.patch('/my/update/avatar', { avatar: str })
